package com.clusterswisdom.horn.api.tmall;

import com.clusterswisdom.horn.api.ioc.HornPropertyParser;

public class TmallPropertyParser implements HornPropertyParser {

	@Override
	public String getParamMethodName(String paramName) {
		String[] params = paramName.split("[_]|[.]");
		StringBuilder methodNameBuilder = new StringBuilder(10);
		
		for (String param : params) {
			methodNameBuilder.append(param.substring(0, 1).toUpperCase());
			methodNameBuilder.append(param.substring(1));
		}
		
		return methodNameBuilder.toString();
	}
}